home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / grafica / amhelios / win_tga.h < prev   
C/C++ Source or Header  |  1999-01-01  |  2KB  |  81 lines

  1. ////////////////////////////////////////////////////////////
  2. //
  3. //  WIN_TGA.H - MS-Windows TARGA Bitmap Class Include File
  4. //
  5. //  Version:    1.03A
  6. //
  7. //  History:    94/12/17 - Created.
  8. //              95/02/05 - Version 1.02A release.
  9. //              95/07/21 - Version 1.02B release.
  10. //              96/02/14 - Version 1.02C release.
  11. //              96/04/01 - Version 1.03A release.
  12. //
  13. //  Compilers:  Microsoft Visual C/C++ Professional V1.5
  14. //              Borland C++ Version 4.5
  15. //
  16. //  Author:     Ian Ashdown, P.Eng.
  17. //              byHeart Software Limited
  18. //              620 Ballantree Road
  19. //              West Vancouver, B.C.
  20. //              Canada V7S 1W3
  21. //              Tel. (604) 922-6148
  22. //              Fax. (604) 987-7621
  23. //
  24. //  Copyright 1994-1996 byHeart Software Limited
  25. //
  26. //  The following source code has been derived from:
  27. //
  28. //    Ashdown, I. 1994. Radiosity: A Programmer's
  29. //    Perspective. New York, NY: John Wiley & Sons.
  30. //
  31. //  It may be freely copied, redistributed, and/or modified
  32. //  for personal use ONLY, as long as the copyright notice
  33. //  is included with all source code files.
  34. //
  35. ////////////////////////////////////////////////////////////
  36.  
  37. #ifndef _WIN_TGA_H
  38. #define _WIN_TGA_H
  39.  
  40. #include "color.h"
  41.  
  42. struct TargaHeader      // TARGA file header
  43. {
  44.   BYTE id_len;          // Identifier field length
  45.   BYTE cmap_type;       // Color map type
  46.   BYTE image_type;      // Image type
  47.   WORD cmap_start;      // First color map entry index
  48.   WORD cmap_num;        // Number of color map entries
  49.   BYTE cmap_size;       // Color map entry size (in bits)
  50.   WORD horz_org;        // Image horizontal origin
  51.   WORD vert_org;        // Image vertical origin
  52.   WORD width;           // Image width
  53.   WORD height;          // Image height
  54.   BYTE bpp;             // Bits per pixel
  55.   BYTE desc;            // Image descriptor
  56. };
  57.  
  58. class WinTarga
  59. {
  60.   private:
  61.     TargaHeader header;     // File header
  62.  
  63.   public:
  64.     WinTarga()
  65.     {
  66.       header.id_len = (BYTE) 0;
  67.       header.cmap_start = (WORD) 0;
  68.       header.horz_org = (WORD) 0;
  69.       header.vert_org = (WORD) 0;
  70.       header.desc = (BYTE) 0;
  71.     }
  72.  
  73.     ~WinTarga() { }
  74.  
  75.     BOOL Write( BYTE __huge *, ColorRGB *, int, int, int,
  76.         int, char * );
  77. };
  78.  
  79. #endif
  80.  
  81.